package com.example.demo.elasticsearch.service;


import com.example.demo.elasticsearch.entity.Goods;
import org.springframework.data.domain.Page;

import java.util.Iterator;
import java.util.List;

public interface GoodsService {

    void createIndex();

    void deleteIndex(String index);

    void save(Goods goods);

    void saveAll(List<Goods> list);

    Iterator<Goods> findAll();

    Page<Goods> findByContent(String content);

    Page<Goods> findByFirstCode(String firstCode);

    Page<Goods> findBySecordCode(String secordCode);

    Page<Goods> query(String key);
}
